Skip to content

fix(record-context): a related object's read that fails is a failure, not a refusal - #37550

Draft
objectstack-fleet[bot] wants to merge 4 commits into
mainfrom
claude/issue-37463-record-context-outage
Draft

objectstack-fleet[bot] wants to merge 4 commits into
mainfrom
claude/issue-37463-record-context-outage

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #37463

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:AI 用资料包读一条记录时,如果关联对象那一步因为故障(比如数据库抖动)读不出来,现在回答「内部错误」,不再谎称「无权访问」;对有权限的拒绝照旧。用户无感于正常路径。
  • 为什么做:属于「记录级 AI 问答」专题,替核对 AI 回答引用的一方解决分不清「没权限」和「出故障」的问题,故障时引用会被如实上报而不是悄悄丢掉。
  • 出错会怎样:最坏情况是某次故障被报成「内部错误」,调用方可以重试,运维在服务器日志里每次都能看到故障原因;回答里不会多说出任何对象、字段或包的名字,改动可直接撤回。
  • 要你做的:无。

What changes

get_record_context (packages/services/service-record-context) reads each related object of a pack before it answers. At four of those reads, a throw that was not a refusal (an outage, a bug) was misanswered. At three of them it came back as PERMISSION_DENIED 403, so the citation verifier (verifyRecordCitations) read it as a refusal and dropped every citation without a report:

Site Before (a failure) After
step 4a, assertApiExposed failure that is not a coded refusal 403 unnamed 500 INTERNAL_ERROR
step 4a, servedObjectDefinitionOf(child) throwing 403 unnamed 500 INTERNAL_ERROR
publishedOf, published-definition read throwing 403 unnamed 500 INTERNAL_ERROR
the child list query, a throw the /data door answers as a fault the raw error, which the doors answered 500 500 INTERNAL_ERROR, the original at the foot of the stack
  • One helper, one line. refusedOrFailed decides refusal vs failure at all four sites. At the three object-level sites it asks isCodedRefusal (in record-context-tools.ts, not on the package entry): the ADR-0112 line, a non-empty string code plus a declared 4xx status (.status, then .statusCode). The verifier imports the same function in place of its private copy. At the child list query it asks the /data door's own classifier, mapDataError from @objectstack/types, which is new as a dependency of this package. Before this change the doors classified that read's throw themselves, so the executor asks them rather than keeping a second reader (seat ruling, REWORK 7193191377 S2).
  • A refusal answers as before. At the object-level sites a coded refusal stays PERMISSION_DENIED 403 within the naming bound; a disabled package's OBJECT_PACKAGE_DISABLED (404, coded) is such a refusal. At the child list query, a throw the door answers below 500 is rethrown untouched, exactly as on main. A sandboxed beforeFind hook's plain throw stays 400 HOOK_ABORTED in the hook's words, and a PERMISSION_DENIED with no status stays the door's PERMISSION_DENIED.
  • What a failure answers, and what it logs. The code is INTERNAL_ERROR 500, not SERVICE_UNAVAILABLE 503. With a 5xx, SERVICE_UNAVAILABLE is on CAPABILITY_ABSENCE_CODES (packages/types/src/server-fault-log.ts), and the doors' fault line logs that code once per route per process, at warn, without the error (record 7193179486, M1). With INTERNAL_ERROR, each door logs the failure at error on every call. The fault line prints an error's message and stack and never its cause (both the console sink and ObjectLogger), so the failure's stack ends in Caused by: plus the original's stack. The original is also on cause for an in-process host; the verifier hands it to onError. A stack never reaches the wire.
  • What an MCP caller sees (S1). On either door the caller gets { code: 'INTERNAL_ERROR', status: 500 } with the message Internal server error. The doors withhold a 5xx's own sentence, so the executor's readFailed sentence (en and zh-Hans; it names the pack and the root only) is read in-process only. Measured on mapDataError: the answer is 500 INTERNAL_ERROR Internal server error whatever cause holds. Tried with no cause, a plain error, a SQLite and a Postgres unique violation, SQLITE_BUSY, and a coded 403.
  • verify-citations.ts: the docblock paragraph that this change made false is rewritten (claim amendment 7192997436).

ADR-0160 (card item 3)

No ADR-0160 sentence fixes 403 for a failed read. The two sentences closest are about refusals only:

Every such refusal carries one code — PERMISSION_DENIED, the code #35145 uses — so the code does not tell a hidden object from a refused one. (D4, "The naming bound")

An object-level refusal names the refused object only when the caller's served schema shows it, and every such refusal carries one code. (point 12)

D3 "Object level" covers refusals by gates and says nothing on reads that fail. So no ADR text has to change for this PR; whether to add a sentence on failures stays with #37490.

Tests

  • record-context-tools.test.ts has a new describe, "a read of a related object that fails is a failure, not a refusal". It has one uncoded-throw case per site: 500, the exact readFailed sentence, none of the outage's names, the original on cause, and Caused by: plus the original's stack in the failure's stack. It has a refusal control per object-level site (OBJECT_PACKAGE_DISABLED 404 stays PERMISSION_DENIED 403, unnamed) and for the child query (a coded refusal is rethrown unchanged). For S2: a sandboxed hook's plain throw (innerMessage) and a status-less PERMISSION_DENIED at the child query are rethrown untouched, while the same throws at an object-level read fail the call. A sandboxed body that crashed (a native error name) is a fault at the door, so it fails the call. A driver errno with no status, a coded 5xx, a status with no code, and a thrown string are failures too. The sentence follows the caller's locale.
  • verify-citations.test.ts: an uncoded throw at the child's served-definition read drops the citation and is reported once through onError (500, cause is the outage). A coded refusal there drops it and reports nothing. A control verifies the same citation.
  • packages/runtime/src/mcp-record-context-tools-bridge.test.ts is the real-kernel harness, run on both doors. Outage: the related-list read of rc_revision throws an uncoded error in engine.find. Asked twice, there are four [5xx] 500 error lines (two doors times two calls), each carrying INTERNAL_ERROR and Caused by: Error: OUTAGE_TEXT (the thrown outage) in its stack, and no capability-absence warning. Both doors answer the same bytes, INTERNAL_ERROR 500, with no object name and no outage text. S2, at the same read: a sandboxed hook's plain throw answers HOOK_ABORTED 400 in the hook's words, and a status-less PERMISSION_DENIED answers PERMISSION_DENIED and never a 5xx. Each case has a control that reads once the spy is removed.

Acceptance notes

  • A refusal the door answers at the child list query is rethrown as on main, so the citation verifier still reports a status-less one (PERMISSION_DENIED with no status, or a hook abort with no code) through onError, as it did on main. The verifier's rule (a string code plus a declared 4xx) is unchanged.
  • The naming-probe read inside the step 4a exposure catch (servedObjectDefinitionOf(...).catch(() => null)) still treats a throw as "not shown". The refusal is a real one, so a throw there only leaves out the object's name.
  • Every failure is INTERNAL_ERROR 500, a bug included (N2 is accepted by the seat).

Verification

Read first, by risk:

  1. record-context-tools.ts: refusedOrFailed, the four catch sites that call it, and the child list query's mapDataError predicate.
  2. record-context-tools.ts isCodedRefusal, and verify-citations.ts importing it.
  3. packages/services/service-record-context/package.json and pnpm-lock.yaml: one workspace dependency, @objectstack/types.

Two-minute check: pnpm --filter @objectstack/service-record-context exec vitest run --maxWorkers=2 src/__tests__/record-context-tools.test.ts. Expect the new describe to pass, every case.

Readings at head bd03a37ed8 (this container, shared box):

Package suites, ablations, local gates, CI
  • pnpm --filter @objectstack/service-record-context test + typecheck: Test Files 4 passed (4), Tests 165 passed (165); tsc clean; check:test-typecheck OK. pnpm --filter @objectstack/runtime test (whole suite): Test Files 649 passed (649), Tests 12064 passed, 25 skipped. Lock VERDICT command-exit 0.
  • pnpm install --frozen-lockfile after the lock edit: exit 0, lockfile unchanged.
  • Ablation M1, via scripts/ablation-replace.mjs: the failure's code reverted to SERVICE_UNAVAILABLE (blob a2fe90f00552 to 48864e37753e), rebuilt, marker present in dist. The harness outage case fails at the fault-line pin (a capability-absence warning was printed, and the expected empty list was not), 1 failed / 26 passed. The service suites go 12 failed / 129 passed.
  • Ablation S2: the child list query's predicate reverted to isCodedRefusal (blob a2fe90f00552 to 104602991144), rebuilt, marker in dist. Service 2 failed / 139 passed (both S2 cases); harness 2 failed / 25 passed (both S2 cases).
  • Restore legs: blob back to a2fe90f00552, equal to HEAD; git diff HEAD empty; rebuilt; marker absent. 141/141 and 27/27 pass.
  • dispatch-gates --ran: 83 derived, 82 run with exit 0, 1 NOT MEASURED. That one is check:dual-build-cjs-loads, which exited 3 with PREREQUISITE NOT MET because it needs every package's dist. check:type-check-debt first exited 3 on a lock queue-timeout; it was rerun with a slot and exited 0.
  • CI on bd03a37ed8: 69 check-runs, 60 success, 9 skipped, 0 failure. Every required context is green, the UI ones included.

Generated by Claude Code

… not a refusal

At the reads of a related object get_record_context judges (step 4a's
exposure check and served definition, a published definition, the child
list query), one helper tells a coded refusal from a failure: a refusal
answers as before, a failure fails the call SERVICE_UNAVAILABLE (503)
naming the pack and the root only, with the original on cause. The
citation verifier reads the same classifier.

Claude-Session: https://claude.ai/code/session_01Utp6CbeF2saT6wUBV4E9uc
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/service-record-context, touching 14 documentable anchor(s). ⚠️ 1 changed file(s) yielded no anchor (packages/services/service-record-context/package.json), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

7 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/api/client-sdk.mdx (via INTERNAL_ERROR (literal, a string literal in executeGetRecordContext))
  • content/docs/api/data-api.mdx (via /:object/:id/change-owner (route, bridged from symbol isRefusal — its route source's handler names it), /:object/change-owner (route, bridged from symbol isRefusal — its route source's handler names it))
  • content/docs/api/error-catalog.mdx (via INTERNAL_ERROR (literal, a string literal in executeGetRecordContext))
  • content/docs/automation/hook-bodies.mdx (via INTERNAL_ERROR (literal, a string literal in executeGetRecordContext))
  • content/docs/permissions/system-context.mdx (via INTERNAL_ERROR (literal, a string literal in executeGetRecordContext))
  • content/docs/plugins/development.mdx (via INTERNAL_ERROR (literal, a string literal in executeGetRecordContext))
  • content/docs/protocol/kernel/error-handling.mdx (via INTERNAL_ERROR (literal, a string literal in executeGetRecordContext))

⛔ 3 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v17/17-0.mdx (via INTERNAL_ERROR (literal, a string literal in executeGetRecordContext))
  • content/docs/releases/v18/18-2.mdx (via INTERNAL_ERROR (literal, a string literal in executeGetRecordContext))
  • content/docs/releases/v18/18-3.mdx (via INTERNAL_ERROR (literal, a string literal in executeGetRecordContext))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/services/service-record-context/package.json) — pages documenting those are invisible to this run
  • 1 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 411646562566a1e12b4e0fc3de256192e8302719 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 03d08c1cf2185a12a867e1557c47ee21b6a2e4fc — the merge of head bd03a37ed869418622699397ed127f0dccdceea6 into base 411646562566a1e12b4e0fc3de256192e8302719, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 03d08c1cf2185a12a867e1557c47ee21b6a2e4fc && git checkout 03d08c1cf2185a12a867e1557c47ee21b6a2e4fc
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 411646562566a1e12b4e0fc3de256192e8302719 bd03a37ed869418622699397ed127f0dccdceea6 && git checkout -B drift-repro 411646562566a1e12b4e0fc3de256192e8302719 && git merge --no-ff bd03a37ed869418622699397ed127f0dccdceea6

node scripts/docs-audit/affected-docs.mjs --json 411646562566a1e12b4e0fc3de256192e8302719

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 411646562566a1e12b4e0fc3de256192e8302719 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract-review-claim: session_01Utp6CYtTDvfPQDzMbZnN5X · head 32aba54 · 2026-11-26T13:12Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 32aba545983608ea7b5787ffeb82d95c829267e2
Local-runs: none

PR #37550, card #37463. Read: the card and its six comments (os-dev report 7192952275, amendment 7192997436), the PR body, the net diff (7 files), and the head's check-runs (53 completed: 37 success, 16 skipped, 0 failed). Code outside the diff was read, not run.

① Derived judgments

  • Accept set: unchanged. Right. No call that answered before is refused now, and none that was refused answers now. Only the error answer of a failing read moves.
  • One classifier at four sites. Right. isCodedRefusal (non-empty string code and a declared 4xx, .status then .statusCode) is the verifier's old private isRefusal, moved unchanged. refusedOrFailed calls it at the exposure check, the served-definition read, publishedOf and the child list query. It is not on the package entry (src/index.ts), so no export is added.
  • Coded refusals unchanged. Right. The refusals the two real doors throw at these reads all declare a status: OBJECT_API_DISABLED 404, OBJECT_API_METHOD_NOT_ALLOWED 405, OBJECT_PACKAGE_DISABLED 404, PermissionDeniedError 403. The stdio door's FIELD_VISIBILITY_UNRESOLVED 503 moves from 403 to 503, which is correct for a read that could not be evaluated.
  • The 503 leaks nothing. Right. Both MCP doors answer a coded 5xx through mapDataError's declared-5xx arm: code and status kept, sentence replaced by Internal server error. That arm is reached before any arm that reads cause, and the arms before it are keyed on other codes. No stack, path, driver text or child name reaches the wire. The executor's own sentence names the pack and the root only, inside ADR-0160 D4's naming bound.
  • No ADR-0160 amendment owed. Right. D4 "The naming bound" and point 12 fix one code for "every such refusal"; D3 "Object level" covers gates that refuse. No sentence of ADR-0160 speaks of a read that fails. ADR untouched, as the claim fences.
  • Callers. An AI caller on either door reads SERVICE_UNAVAILABLE 503 for an outage and PERMISSION_DENIED 403 for a refusal, so the two are told apart. The verifier drops and reports the first, drops and stays silent on the second. Right, subject to the findings below.
  • Pins. Each of the four sites has its own uncoded-throw case, and its own coded-refusal control. The verifier pin and one real-kernel case on both doors are present. One ablation was run, on the classifier (every throw read as a refusal): 16 service cases and the harness case failed. The opposite direction (a refusal read as a failure) was not ablated; the per-site controls cover it.

M1 (must-fix) — at both MCP doors the outage is logged once, at warn, as a "declared capability absence", and the original error is never logged. dataDoorErrorResult (packages/mcp/src/mcp-http-tools.ts) hands logServerFault the door's code. SERVICE_UNAVAILABLE with a 5xx is on CAPABILITY_ABSENCE_CODES (packages/types/src/server-fault-log.ts), the list for "this deployment did not install that". Such a line is printed once per route per process (the route is tools/call get_record_context plus the root object), at warn, without the error object, so without cause. Every later outage on that root object prints nothing. On main the child list query's raw throw was logged at error on every call with the driver's text; this PR takes that away. The card names the people who debug outages as a beneficiary, and the changeset says the original error is there "for the host". That holds for the verifier's onError only. Fix either by a failure code that is not on the absence list, or by logging the cause at error in the door (that file is outside the claimed surface, so it needs a claim amendment). Pin the log line in the harness case. Read from the three functions; not run.

S1 (should-fix) — the readFailed sentence reaches no MCP caller. The doors withhold a 5xx sentence unless the throw declares it for the caller (refusal: true, or userMessage). The throw declares neither, so the caller reads Internal server error. The en and zh-Hans sentences, the locale test, and the advice "try again later, or read the record with get_record" are in-process only. The changeset reads as if the caller is shown the sentence. Either declare it for the caller and pin it on both doors, or say in the changeset what the doors answer.

S2 (should-fix) — at the child list query, a refusal the door recognises without code-plus-status is now answered as an outage. On main that throw was not caught, so the door classified it. A sandboxed beforeFind hook's plain throw new Error(...) (no code) answered 400 HOOK_ABORTED with the hook's sentence; a code-only PERMISSION_DENIED answered 403. Both now answer 503 Internal server error. The card's wording ("not a coded refusal") and the verifier's rule support the dev's line, so this needs a decision, not a guess: either ask the door's classification at this one site, or rule that a status-less refusal is a failure here and pin it. The query control uses a coded 403 only.

N1 (nit) — the changeset says all four reads were refused PERMISSION_DENIED 403 before. The child list query was not: it answered the door's 500 (the dev's own reading). The PR body's table has it right.

N2 (nit) — every uncoded throw is SERVICE_UNAVAILABLE, a bug included. The error catalog gives that code retry_backoff, so a deterministic bug invites retries. The card allows the code.

② Semver level

  • patch on @objectstack/service-record-context: right. A bug fix, no new entry export, no spec change. SERVICE_UNAVAILABLE 503 is already in the error ledger and the error catalog. The packages/runtime change is a test, so it publishes nothing.
  • Clause-②: no: right, with no arm. Not a widening: nothing new is accepted. Not a narrowing: nothing accepted before is refused now. No published type, protocol doc or skill documents 403 for a failed read; skills/objectstack-ai/references/context-packs.md states 403 for a related object nobody is served, which still holds.
  • Metadata-protocol: none: right. Both lines are line-initial in the PR body and the changeset. Check Changeset passed.

③ Boundary flags

  • open_questions: none filed.
  • Deviation 1 (verify-citations.ts edited): answered by claim amendment 7192997436. Accepted.
  • Deviation 2 (the child query's coded refusal is rethrown as the door wrote it): accepted for coded refusals, as on main. The status-less case is S2, escalated to the area.
  • Deviations 3 and 4 (PR footer, a killed waiter): process only, no contract effect.
  • SQL push-down: no new read, no id materialisation, no in-app join. The diff wraps the one existing child query in a try.
  • No packages/spec/** and no docs/adr/** in the diff, as the claim fences.

Implemented-by: claude/issue-37463-record-context-outage
Reviewed-by: session_01Utp6CYtTDvfPQDzMbZnN5X

VERDICT: FAIL

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

席位核对

Head-sha: 32aba545983608ea7b5787ffeb82d95c829267e2
REWORK — L1, seat repo:objectstack#5

  1. Shape: open draft against main, Fixes #37463. 7 files, +255/−54. Not governed. Clause-②: no, Metadata-protocol: none, patch; the reviewer confirms this, since no published surface documents the old answer. No review face, so the declaration face applies; the seat ran it on the contract-review tier because it changes an error answer.
  2. Premise: one classifier, isCodedRefusal, now runs at all four sites. Coded refusals are unchanged, and an uncoded throw answers 503 SERVICE_UNAVAILABLE without leaking anything. No ADR-0160 amendment is needed.
  3. Gates: contract record 7193179486 reads FAIL, with one must-fix. CI on this head: 37 success, 16 skipped, 0 failed.
  4. Owed for the delta:
    • M1: the outage now disappears from the server log. SERVICE_UNAVAILABLE with a 5xx is on CAPABILITY_ABSENCE_CODES (packages/types/src/server-fault-log.ts). So dataDoorErrorResult logs it once per root object per process, at warn, as a capability absence, without the error or its cause; on main it was logged at error on every call. Make an outage log at error with its cause on every occurrence. Either answer with a failure code that is not on the capability-absence list, or log the cause in the door. If the fix touches a file outside the claim, amend the claim first. Pin it, with the ablation.
    • S1: the en and zh-Hans readFailed sentences and the "try again later, or use get_record" advice never reach an MCP caller, because both doors replace an undeclared 5xx sentence with Internal server error. Either make the changeset and PR body say what the caller actually sees, or carry the sentence to the caller. The seat prefers the first; it is cheaper and honest.
    • S2: the seat rules here. A child-query throw that main already answered as a refusal stays a refusal. That means a sandboxed beforeFind hook's plain throw keeps 400 HOOK_ABORTED, and a code-only PERMISSION_DENIED keeps 403. Only a truly uncoded failure becomes 503. Pin both cases.
    • N1 (the changeset misstates the child query's old answer): fix it with S1. N2 (a bug also reads as a retryable 503) is accepted.
  5. Out of scope and where it went: none.
  6. Next: push, then knock. The same reviewer reads M1, S1 and S2. After ACCEPT, area ai-36996 lands it.

…lt; door refusals at the list read stay

A failure at a related object's read now answers INTERNAL_ERROR (500):
SERVICE_UNAVAILABLE with a 5xx is a declared capability absence the
doors log once per route at warn without the error. At the child list
query the executor asks the /data door's own classifier (mapDataError),
so a sandboxed hook's plain throw stays 400 HOOK_ABORTED and a
status-less PERMISSION_DENIED stays 403; only a door fault fails.

Claude-Session: https://claude.ai/code/session_01Utp6CbeF2saT6wUBV4E9uc
Co-authored-by: Claude <noreply@anthropic.com>
…he door's refusals at the list read

The doors' fault line prints an error's message and stack, never its
cause, so the failure's stack ends with the original. The harness pins
an error line per call per door with the outage in it, and the two
refusals the /data door answers below 500 at the list read.

Claude-Session: https://claude.ai/code/session_01Utp6CbeF2saT6wUBV4E9uc
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the dependencies Pull requests that update a dependency file label Nov 26, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

37418 跟进:资料包读取把关联对象的故障当作「无权」拒绝,故障应如实报出且不泄露

2 participants